home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: MegaDisc / MegaDisc 36 (1993-11)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).zip / MegaDisc 36 (1993-11)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).adf / ARexx / Modular / Modular.rexx < prev    next >
OS/2 REXX Batch file  |  1993-08-19  |  1KB  |  35 lines

  1.     /*  Modular Programming  */
  2.     s = SetClip('inner_open','0')     /*  Needed by external functions */
  3.     s = SetClip('gadno','0')                   
  4.     call ActiveLibs.mod()
  5.     call ConWin.mod(50,50,530,140)
  6.     call ArpWin.mod(10,10,620,200) 
  7.     call OpenPort(PO)                /* Make that Port available here */
  8.     call GadSet.mod(9,30,20,16)                 /* ngads, x, y, ystep */
  9.     call Labels.mod(9,70,27,16)                /* nlines, x, y, ystep */
  10.                 
  11.     do forever  
  12.      call waitpkt(PO) ; p = getpkt(PO)
  13.      if p ~== NULL() then do                                  
  14.        i = getarg(p) ;  t = reply(p, 0)
  15.        if i = 'CLOSEWINDOW' then call CloseWin()
  16.        parse var i class n 
  17.        if class = 'GADGETUP' then
  18.          if n = 9 then call CloseWin() ; else call Gadget.mod(n)  
  19.        if class = 'MOUSEBUTTONS' then call Mouse()
  20.        end
  21.      end        
  22.     exit
  23.     
  24.     CloseWin:
  25.      if GetClip('inner_open') = '1' then call InnerWin.mod()
  26.      CloseWindow(HO) ; exit ; end
  27.      return
  28.     
  29.     Mouse:
  30.       parse var i class x y 
  31.       call pat(500,7,'        ') ; call pat(500,7,x y) 
  32.       return
  33.    
  34.     pat: call Move(HO,arg(1),arg(2)) ; call Text(HO,arg(3)) ; return
  35.